Skip to main content
Version: 6.1.0 - 6.1.1

getBlockTransactionCount <src>

Retrieves the count of transactions within a block.

Usage

tronWeb.trx.getBlockTransactionCount(blockHeightOrBlockHash)

Parameters

ParametersParameter DescriptionData Type
Block Height or Block HashThe height of the block or the block hash you wish to obtain transaction count data for.Integer/string

Return

Number - The number of transactions in the block.

Example

await tronWeb.trx.getBlockTransactionCount(16012520);
35
await tronWeb.trx.getBlockTransactionCount("0000000000f454e84edbee2365fbf1bf34bc98283ded06e68311bb6e5bea3cf6");
35